/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$(document).ready(function(){
    $("#login_btn").click(autenticarUsuario)
})

function autenticarUsuario(){

     $.ajax({
                    type:'POST',
                    url:'/ilapiz/LoginServlet',
                    data:'login='+$("#username").val()+'&clave='+$("#password").val(),
                    beforeSend: function(x){

                    },
                    success:function(msg) {

                        if(msg==1){
                            alert("ingreso");
                        }
                    }
                });
}